package com.seanLab.web;

import com.seanLab.domain.UserDocs;
import com.seanLab.repository.UserDocsRepo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 仅做测试使用
 * Created by BodeNg on 2018-6-4.
 */
@CrossOrigin(origins = "*", maxAge = 3600)
@RestController
@RequestMapping("/v1/demo")
public class DemoController {
    @Autowired
    UserDocsRepo userDocsRepo;

    @RequestMapping(path = "/getDemoArticles", method = RequestMethod.GET)
    public @ResponseBody List<UserDocs> getDemoArticles() {
        return userDocsRepo.findAll();
    }
}
